package assig2;
import java.util.*;


/** A class for holding 2-dimensional art objects
 *
 * @author ciaraldi
 *
 */

public class Drawing extends Art {
	private double height; // Horizontal dimension in inches
	private double width;  // Vertical dimension in inches
		
	/**
	 * @return the height
	 */
	public double getHeight() {
		return height;
	}

	/**
	 * @return the width
	 */
	public double getWidth() {
		return width;
	}

	/**
	 * @param height the height to set
	 */
	public void setHeight(double height) {
		this.height = height;
	}

	/**
	 * @param width the width to set
	 */
	public void setWidth(double width) {
		this.width = width;
	}

	/** Default constructor
	 * 
	 */
	Drawing () {
		// Note: Default constructor of parent is invoked automatically
		height = 0.0;
		width = 0.0;
	}
	
	/** A more complete constructor!
	 * @param creationDate
	 * @param ownerName 
	 * @param ownerId
	 * @param height Vertical dimension in inches
	 * @param width Horizontal dimesnion in inches
	 */
	Drawing(Date creationDate, String ownerName, long ownerId,
			double height, double width) {
		// Instead of the default constructor, explicitly invoke 
		// the parent constructor with proper parameters
		super(creationDate, ownerName, ownerId);
		this.height = height;
		this.width = width;
	}
	
	/**
	 * @return String version of the object
	 */
	public String toString() {
		String s; // Return string to construct;
		s = super.toString(); // Invoke toString() of parent class
		s = s + " Height = " + height + " inches Width = " 
			+ width + " inches";
		return s;
	}
}
